<template>
    <canvas id="canvas" width="200" height="100"></canvas>
</template>

<script>
    export default {
        name: "TryTwoPicture",
        mounted() {
            var oCanvas = document.getElementById("canvas");
            var width = oCanvas.width;
            var height = oCanvas.height;
            //上下文--画笔
            var context = oCanvas.getContext("2d");



            let img2 = new Image()
            img2.src = "src/renderer/assets/pr列属性.png"
            //图片加载完后，将其显示在canvas中
            img2.onload = function(){
                context.drawImage(this, 0, 0)
                // context.drawImage(this, 0, 0, 1080, 980)改变图片大小到1080*980
            }

            let img = new Image()
            img.src = "src/renderer/assets/1.1.png"
            //图片加载完后，将其显示在canvas中
            img.onload = function(){
                context.drawImage(this, 0, 0)
                // context.drawImage(this, 0, 0, 1080, 980)改变图片大小到1080*980
            }
            // context.globalCompositeOperation = 'destination-out';
        },
        methods: {

        }
    }
</script>

<style scoped>

</style>